
#@homejs()
#@checkToken2()
<script src="/assets/js/dateclick/WdatePicker.js"></script>
<link href="/assets/js/dateclick/skin/WdatePicker.css" rel="stylesheet" type="text/css">
<div style="width:880px;min-height:600px;"> 
	<div align="left" style="width:880px;height:50px;">
		<div seleinfo1="shouzhi" align="center" class="userinvest userinvest2" >基本信息</div>
	</div>
	
	<!--标的列表-->
	<div align="left" style="padding:10px 20px 20px 20px;;width:840px;height:600px;background:#FFF;">
		<div style="line-height:50px;font-size:16px;height:550px;margin-top:50px;">
			<div style="clear:both">
				<div align="right" style="float:left;width:200px;margin-right:30px;">用户名</div>
				<div align="left"  id="mobile" style="float:left;width:100px;color:#939393;margin-right:30px;"></div>
				<div align="right" style="float:left;width:100px;margin-right:30px;">
					<img style="margin-top:20px;" src="#(path)/assets/home/account/account_img14.png">
				</div>
				<div id="mobileinput" align="left" style="cursor:pointer;float:left;width:200px;">
					修改
				</div>
			</div>
			<div style="clear:both">
				<div align="right" style="float:left;width:200px;margin-right:30px;">支付账户</div>
				<div id="bankcard1" hidden align="left"  style="cursor:pointer;float:left;width:100px;color:#fd4255;margin-right:30px;">未绑定</div>
				<div id="bankcard2" hidden style="float:left">
					<div align="left" id="bank_card" style="float:left;width:100px;color:#939393;margin-right:30px;"></div>
					<div align="right" style="float:left;width:100px;margin-right:30px;">
						<img style="margin-top:20px;" src="#(path)/assets/home/account/account_img14.png">
					</div>
					<div align="left" id="changebankcard" style="cursor:pointer;float:left;width:200px;">解绑</div>
				</div>
			</div>
			<div style="clear:both">
				<div align="right" style="float:left;width:200px;margin-right:30px;">实名认证</div>
				<div id="realname1" hidden align="left"  style="cursor:pointer;float:left;width:100px;color:#fd4255;margin-right:30px;">未认证</div>
				<div id="realname2" hidden style="float:left">
					<div align="left" id="realname" style="float:left;width:100px;color:#939393;margin-right:30px;"></div>
					<div align="right" style="float:left;width:100px;margin-right:30px;">
						<img style="margin-top:20px;" src="#(path)/assets/home/account/account_img14.png">
					</div> 
				</div> 
			</div>
			<div style="clear:both">
				<div align="right" style="float:left;width:200px;margin-right:30px;">邮箱</div>
				<div id="email1" class="emailinput" hidden align="left"  style="cursor:pointer;float:left;width:100px;color:#fd4255;margin-right:30px;">未绑定</div>
				<div id="email2" hidden style="float:left">
					<div align="left" id="email" style="float:left;width:100px;color:#939393;margin-right:30px;"></div>
					<div align="right" style="float:left;width:100px;margin-right:30px;">
						<img style="margin-top:20px;" src="#(path)/assets/home/account/account_img14.png">
					</div>
					<div  align="left" class="emailinput" style="cursor:pointer;float:left;width:200px;">修改</div>
				</div>
			</div>
			<div style="clear:both">
				<div align="right" style="float:left;width:200px;margin-right:30px;">登录密码</div>
				<div align="left" style="float:left;width:100px;color:#939393;margin-right:30px;">已设置</div>
				<div align="right" style="float:left;width:100px;margin-right:30px;">
					<img style="margin-top:20px;" src="#(path)/assets/home/account/account_img14.png">
				</div>
				<div align="left" class="changepassword" style="cursor:pointer;float:left;width:200px;">修改</div>
			</div>
			<div style="clear:both"> 
				<div align="right" style="float:left;width:200px;margin-right:30px;">安全问题</div>
				<div id="question1" class="questioninput" hidden align="left"  style="cursor:pointer;float:left;width:100px;color:#fd4255;margin-right:30px;">未设置</div>
				<div id="question2" hidden style="float:left">
					<div align="left" style="float:left;width:100px;color:#939393;margin-right:30px;">已设置</div>
					<div align="right" style="float:left;width:100px;margin-right:30px;">
						<img style="margin-top:20px;" src="#(path)/assets/home/account/account_img14.png">
					</div>
					<div  align="left" class="questioninput" style="cursor:pointer;float:left;width:200px;">修改</div>
				</div>
			</div>
			<div align="center" style="clear:both;padding-top:30px;width:840px;">
				<img style="margin-right:10px;" src="#(path)/assets/home/account/account_img15.png">
				因个人信息涉及到发生购买行为的合同有效性，故<span>用户姓名及身份认证信息</span>不可修改。
			</div>
		</div>	
	</div>
</div>

<script>
	$.getJSON("#(path)/user/info?token=#(session.token??)", function(userinfo) {
		console.log(userinfo); 
		var userinfo = userinfo.data.info;
		$("#mobile").html(userinfo.mobile.substr(0,3)+"****"+userinfo.mobile.substr(7,11));
		console.log(userinfo);
		//判断实名
		if(userinfo.is_real_name_verify =="0"){
			$("#realname2").remove();
			$("#realname1").show();
		}else{
			$("#realname1").remove(); 
			$("#realname2").show();
			$("#realname").html(userinfo.real_name.substr(0,1)+"**");
		}
		//判断绑卡
		if(userinfo.is_bind_bank_card =="0"){
			$("#bankcard2").remove();
			$("#bankcard1").show();
		}else{
			$("#bankcard1").remove(); 
			$("#bankcard2").show();
			$("#bank_card").html(userinfo.bank_card.substr(0,4)+"*******"+userinfo.bank_card.substr(15,19));
		}
		//判断邮箱
		if(userinfo.is_mail_verify =="0"){ 
			$("#email2").remove();
			$("#email1").show();
		}else{
			$("#email1").remove(); 
			$("#email2").show();
			$("#email").html(userinfo.email);
		}
		//判断安全问题 
		if(userinfo.is_set_auth_question =="0"){
			$("#question2").remove();
			$("#question1").show();
		}else{
			$("#question1").remove(); 
			$("#question2").show();
		}
	});
	//实名
	$("#realname1").click(function(){
		$("#realnamemengban").show();
	});
	//手机号更改
	$("#mobileinput").click(function(){
		$("#changemobilemengban").show();
	});
	$(".emailinput").click(function(){
		$("#changemailmengban").show();
	});
	$(".questioninput").click(function(){
		$("#changeanswermengban").show();
	});
	$(".changepassword").click(function(){
		$("#changepasswordmengban").show();
	});
	$("#closethis").click(function(){
		$("#mengban").hide();
		
	});
	$("#bankcard1").click(function(){
		$("#openaccountmengban").show();
	});
	$("#changebankcard").click(function(){
		$("#changebankcardmengban").show();
	});
	
</script>
